
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module lea</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>lea</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/Users/admin/Documents/lea2/lea.py">/Users/admin/Documents/lea2/lea.py</a></font></td></tr></table>
    <p><tt>--------------------------------------------------------------------------------<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;lea.py<br>
&nbsp;<br>
--------------------------------------------------------------------------------<br>
Copyright&nbsp;2013,&nbsp;2014,&nbsp;2015&nbsp;Pierre&nbsp;Denis<br>
&nbsp;<br>
This&nbsp;file&nbsp;is&nbsp;part&nbsp;of&nbsp;<a href="#Lea">Lea</a>.<br>
&nbsp;<br>
<a href="#Lea">Lea</a>&nbsp;is&nbsp;free&nbsp;software:&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and/or&nbsp;modify<br>
it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;Lesser&nbsp;General&nbsp;Public&nbsp;License&nbsp;as&nbsp;published&nbsp;by<br>
the&nbsp;Free&nbsp;Software&nbsp;Foundation,&nbsp;either&nbsp;version&nbsp;3&nbsp;of&nbsp;the&nbsp;License,&nbsp;or<br>
(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.<br>
&nbsp;<br>
<a href="#Lea">Lea</a>&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,<br>
but&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of<br>
MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;&nbsp;See&nbsp;the<br>
GNU&nbsp;Lesser&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.<br>
&nbsp;<br>
You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;Lesser&nbsp;General&nbsp;Public&nbsp;License<br>
along&nbsp;with&nbsp;<a href="#Lea">Lea</a>.&nbsp;&nbsp;If&nbsp;not,&nbsp;see&nbsp;&lt;<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>&gt;.<br>
--------------------------------------------------------------------------------</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="operator.html">operator</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="lea.html#Lea">Lea</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Lea">class <strong>Lea</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#Lea">Lea</a>&nbsp;is&nbsp;an&nbsp;abstract&nbsp;class&nbsp;representing&nbsp;discrete&nbsp;probability&nbsp;distributions.<br>
&nbsp;<br>
Each&nbsp;instance&nbsp;of&nbsp;concrete&nbsp;<a href="#Lea">Lea</a>&nbsp;subclasses&nbsp;(called&nbsp;simply&nbsp;a&nbsp;"<a href="#Lea">Lea</a>&nbsp;instance"&nbsp;in&nbsp;the&nbsp;following)<br>
represents&nbsp;a&nbsp;discrete&nbsp;probability&nbsp;distribution,&nbsp;which&nbsp;associates&nbsp;each&nbsp;value&nbsp;of&nbsp;a&nbsp;set&nbsp;of<br>
values&nbsp;with&nbsp;the&nbsp;probability&nbsp;that&nbsp;such&nbsp;value&nbsp;occurs.<br>
&nbsp;<br>
A&nbsp;<a href="#Lea">Lea</a>&nbsp;instance&nbsp;can&nbsp;be&nbsp;defined&nbsp;by&nbsp;a&nbsp;sequence&nbsp;of&nbsp;(value,weight),&nbsp;giving&nbsp;the&nbsp;probability&nbsp;weight&nbsp;<br>
of&nbsp;each&nbsp;value.&nbsp;Such&nbsp;probability&nbsp;weights&nbsp;are&nbsp;natural&nbsp;numbers.&nbsp;The&nbsp;actual&nbsp;probability&nbsp;of&nbsp;a<br>
given&nbsp;value&nbsp;can&nbsp;be&nbsp;calculated&nbsp;by&nbsp;dividing&nbsp;a&nbsp;weight&nbsp;by&nbsp;the&nbsp;sum&nbsp;of&nbsp;all&nbsp;weights.&nbsp;<br>
&nbsp;<br>
A&nbsp;<a href="#Lea">Lea</a>&nbsp;instance&nbsp;can&nbsp;be&nbsp;defined&nbsp;also&nbsp;by&nbsp;a&nbsp;sequence&nbsp;of&nbsp;values,&nbsp;their&nbsp;probability&nbsp;weight&nbsp;being&nbsp;<br>
their&nbsp;number&nbsp;of&nbsp;occurences&nbsp;in&nbsp;the&nbsp;sequence.<br>
&nbsp;<br>
<a href="#Lea">Lea</a>&nbsp;instances&nbsp;can&nbsp;be&nbsp;combined&nbsp;in&nbsp;arithmetic&nbsp;expressions&nbsp;resulting&nbsp;in&nbsp;new&nbsp;<a href="#Lea">Lea</a>&nbsp;instances,&nbsp;by<br>
obeying&nbsp;the&nbsp;following&nbsp;rules:<br>
&nbsp;<br>
-&nbsp;<a href="#Lea">Lea</a>&nbsp;instances&nbsp;can&nbsp;be&nbsp;added,&nbsp;subtracted,&nbsp;multiplied&nbsp;and&nbsp;divided&nbsp;together,<br>
through&nbsp;+,&nbsp;-,&nbsp;*,&nbsp;/&nbsp;operators.&nbsp;The&nbsp;resulting&nbsp;distribution's&nbsp;values&nbsp;and&nbsp;probabilities<br>
are&nbsp;determined&nbsp;by&nbsp;combination&nbsp;of&nbsp;operand's&nbsp;values&nbsp;with&nbsp;a&nbsp;sum&nbsp;weighted&nbsp;by&nbsp;probability<br>
products&nbsp;(the&nbsp;operation&nbsp;known&nbsp;as&nbsp;'convolution',&nbsp;for&nbsp;the&nbsp;adition&nbsp;case).<br>
&nbsp;<br>
-&nbsp;Other&nbsp;supported&nbsp;binary&nbsp;arithmetic&nbsp;operators&nbsp;are&nbsp;power&nbsp;(**),&nbsp;modulo&nbsp;(%)&nbsp;and<br>
divmod&nbsp;function.<br>
&nbsp;<br>
-&nbsp;Unary&nbsp;operators&nbsp;+,&nbsp;-&nbsp;and&nbsp;abs&nbsp;function&nbsp;are&nbsp;supported&nbsp;also.<br>
&nbsp;<br>
-&nbsp;The&nbsp;Python's&nbsp;operator&nbsp;precedence&nbsp;rules,&nbsp;with&nbsp;the&nbsp;parenthesis&nbsp;overrules,&nbsp;are&nbsp;fully<br>
respected.<br>
&nbsp;<br>
-&nbsp;Any&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;X,&nbsp;which&nbsp;is&nbsp;not&nbsp;a&nbsp;<a href="#Lea">Lea</a>&nbsp;instance,&nbsp;involved&nbsp;as&nbsp;argument&nbsp;of&nbsp;an<br>
expression&nbsp;containing&nbsp;a&nbsp;<a href="#Lea">Lea</a>&nbsp;instance,&nbsp;is&nbsp;coerced&nbsp;to&nbsp;a&nbsp;<a href="#Lea">Lea</a>&nbsp;instance<br>
having&nbsp;X&nbsp;has&nbsp;sole&nbsp;value,&nbsp;with&nbsp;probability&nbsp;1&nbsp;(i.e.&nbsp;occurrence&nbsp;of&nbsp;X&nbsp;is&nbsp;certain).<br>
&nbsp;<br>
-&nbsp;<a href="#Lea">Lea</a>&nbsp;instances&nbsp;can&nbsp;be&nbsp;compared&nbsp;together,&nbsp;through&nbsp;==,&nbsp;!=,&nbsp;&lt;,&nbsp;&lt;=,&nbsp;&gt;,&nbsp;&gt;=&nbsp;operators.<br>
The&nbsp;resulting&nbsp;distribution&nbsp;is&nbsp;a&nbsp;boolean&nbsp;distribution,&nbsp;giving&nbsp;probability&nbsp;of&nbsp;True&nbsp;result<br>
and&nbsp;complementary&nbsp;probability&nbsp;of&nbsp;False&nbsp;result.<br>
&nbsp;<br>
-&nbsp;Boolean&nbsp;distributions&nbsp;can&nbsp;be&nbsp;combined&nbsp;together&nbsp;with&nbsp;AND,&nbsp;OR,&nbsp;XOR,&nbsp;through&nbsp;&amp;,&nbsp;|,&nbsp;^<br>
operators,&nbsp;respectively.<br>
&nbsp;<br>
-&nbsp;WARNING:&nbsp;the&nbsp;Python's&nbsp;and,&nbsp;or,&nbsp;not,&nbsp;operators&nbsp;shall&nbsp;not&nbsp;be&nbsp;used&nbsp;because&nbsp;they&nbsp;do&nbsp;not&nbsp;return<br>
any&nbsp;sensible&nbsp;result.&nbsp;Replace:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;and&nbsp;b&nbsp;&nbsp;&nbsp;&nbsp;by&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;&amp;&nbsp;b<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;or&nbsp;b&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;|&nbsp;b<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;not&nbsp;a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by&nbsp;&nbsp;&nbsp;&nbsp;~&nbsp;a<br>
&nbsp;<br>
-&nbsp;WARNING:&nbsp;in&nbsp;boolean&nbsp;expression&nbsp;involving&nbsp;arithmetic&nbsp;comparisons,&nbsp;the&nbsp;parenthesis<br>
shall&nbsp;be&nbsp;used,&nbsp;e.g.&nbsp;(a&nbsp;&lt;&nbsp;b)&nbsp;&amp;&nbsp;(b&nbsp;&lt;&nbsp;c)<br>
&nbsp;<br>
-&nbsp;WARNING:&nbsp;the&nbsp;augmented&nbsp;comparison&nbsp;(a&nbsp;&lt;&nbsp;b&nbsp;&lt;&nbsp;c)&nbsp;expression&nbsp;shall&nbsp;not&nbsp;be&nbsp;used.;&nbsp;it&nbsp;does<br>
not&nbsp;return&nbsp;any&nbsp;sensible&nbsp;result&nbsp;(reason:&nbsp;it&nbsp;has&nbsp;the&nbsp;same&nbsp;limtation&nbsp;as&nbsp;'and'&nbsp;operator).<br>
&nbsp;<br>
<a href="#Lea">Lea</a>&nbsp;instances&nbsp;can&nbsp;be&nbsp;used&nbsp;to&nbsp;generate&nbsp;random&nbsp;values,&nbsp;respecting&nbsp;the&nbsp;given&nbsp;probabilities.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
There&nbsp;are&nbsp;ten&nbsp;concrete&nbsp;subclasses&nbsp;to&nbsp;<a href="#Lea">Lea</a>,&nbsp;namely:&nbsp;Alea,&nbsp;Clea,&nbsp;Plea,&nbsp;Flea,&nbsp;Tlea,&nbsp;Ilea,&nbsp;Olea,<br>
&nbsp;Dlea,&nbsp;Mlea,&nbsp;Rlea&nbsp;and&nbsp;Blea.<br>
&nbsp;<br>
Each&nbsp;subccass&nbsp;represents&nbsp;a&nbsp;special&nbsp;kind&nbsp;of&nbsp;discrete&nbsp;probability&nbsp;distribution,&nbsp;with&nbsp;its&nbsp;own&nbsp;data<br>
or&nbsp;with&nbsp;references&nbsp;to&nbsp;other&nbsp;<a href="#Lea">Lea</a>&nbsp;instances&nbsp;to&nbsp;be&nbsp;combined&nbsp;together&nbsp;through&nbsp;a&nbsp;given&nbsp;operation.<br>
Each&nbsp;subclass&nbsp;defines&nbsp;what&nbsp;are&nbsp;the&nbsp;(value,probability)&nbsp;pairs&nbsp;or&nbsp;how&nbsp;they&nbsp;can&nbsp;be&nbsp;generated&nbsp;(see<br>
_genVPs&nbsp;method&nbsp;implemented&nbsp;in&nbsp;each&nbsp;<a href="#Lea">Lea</a>&nbsp;subclass,&nbsp;which&nbsp;is&nbsp;called&nbsp;by&nbsp;<a href="#Lea">Lea</a>.genVPs&nbsp;method).&nbsp;<br>
The&nbsp;<a href="#Lea">Lea</a>&nbsp;class&nbsp;acts&nbsp;as&nbsp;a&nbsp;facade,&nbsp;by&nbsp;providing&nbsp;different&nbsp;methods&nbsp;to&nbsp;instantiate&nbsp;these&nbsp;subclasses,<br>
so&nbsp;it&nbsp;is&nbsp;usually&nbsp;not&nbsp;needed&nbsp;to&nbsp;instantiate&nbsp;them&nbsp;explicitely.&nbsp;<br>
&nbsp;<br>
Here&nbsp;is&nbsp;an&nbsp;overview&nbsp;on&nbsp;these&nbsp;subclasses,&nbsp;with&nbsp;their&nbsp;relationships.<br>
&nbsp;<br>
-&nbsp;An&nbsp;Alea&nbsp;instance&nbsp;is&nbsp;defined&nbsp;by&nbsp;explicit&nbsp;value-probability&nbsp;pairs.&nbsp;Each&nbsp;probability&nbsp;is<br>
defined&nbsp;as&nbsp;a&nbsp;positive&nbsp;"counter"&nbsp;integer,&nbsp;without&nbsp;upper&nbsp;limit.&nbsp;The&nbsp;actual<br>
probability&nbsp;is&nbsp;calculated&nbsp;by&nbsp;dividing&nbsp;the&nbsp;counter&nbsp;by&nbsp;the&nbsp;sum&nbsp;of&nbsp;all&nbsp;counters.<br>
&nbsp;<br>
Instances&nbsp;of&nbsp;other&nbsp;<a href="#Lea">Lea</a>&nbsp;subclasses&nbsp;represent&nbsp;probability&nbsp;distributions&nbsp;obtained&nbsp;by<br>
operations&nbsp;done&nbsp;on&nbsp;existing&nbsp;<a href="#Lea">Lea</a>&nbsp;instance(s),&nbsp;assuming&nbsp;that&nbsp;represented&nbsp;events&nbsp;are&nbsp;independent.<br>
Any&nbsp;instance&nbsp;of&nbsp;such&nbsp;subclasses&nbsp;forms&nbsp;a&nbsp;tree&nbsp;structure,&nbsp;having&nbsp;other&nbsp;<a href="#Lea">Lea</a>&nbsp;instances&nbsp;as&nbsp;nodes<br>
and&nbsp;Alea&nbsp;instances&nbsp;as&nbsp;leaves.&nbsp;These&nbsp;use&nbsp;lazy&nbsp;evaluation:&nbsp;actual&nbsp;value-probability&nbsp;pairs&nbsp;are<br>
calculated&nbsp;only&nbsp;at&nbsp;the&nbsp;time&nbsp;they&nbsp;are&nbsp;required&nbsp;(e.g.&nbsp;display);&nbsp;then,&nbsp;these&nbsp;are&nbsp;cached&nbsp;in&nbsp;an<br>
Alea&nbsp;instance,&nbsp;itself&nbsp;attribute&nbsp;of&nbsp;the&nbsp;<a href="#Lea">Lea</a>&nbsp;instance,&nbsp;to&nbsp;speed&nbsp;up&nbsp;next&nbsp;accesses.<br>
&nbsp;<br>
Here&nbsp;is&nbsp;a&nbsp;brief&nbsp;presentation&nbsp;of&nbsp;these&nbsp;subclasses:&nbsp;<br>
&nbsp;<br>
-&nbsp;the&nbsp;Clea&nbsp;subclass&nbsp;provides&nbsp;the&nbsp;cartesian&nbsp;product&nbsp;of&nbsp;a&nbsp;given&nbsp;sequence&nbsp;of&nbsp;<a href="#Lea">Lea</a>&nbsp;instances;<br>
-&nbsp;the&nbsp;Plea&nbsp;subclass&nbsp;provides&nbsp;the&nbsp;cartesian&nbsp;product&nbsp;of&nbsp;one&nbsp;<a href="#Lea">Lea</a>&nbsp;instance&nbsp;with&nbsp;itself,&nbsp;a&nbsp;given&nbsp;number&nbsp;of&nbsp;times;<br>
-&nbsp;the&nbsp;Flea&nbsp;subclass&nbsp;applies&nbsp;a&nbsp;given&nbsp;function&nbsp;to&nbsp;a&nbsp;given&nbsp;sequence&nbsp;of&nbsp;<a href="#Lea">Lea</a>&nbsp;instances;<br>
-&nbsp;the&nbsp;Tlea&nbsp;subclass&nbsp;applies&nbsp;a&nbsp;given&nbsp;2-ary&nbsp;function,&nbsp;a&nbsp;given&nbsp;number&nbsp;of&nbsp;times,&nbsp;on&nbsp;a&nbsp;given&nbsp;<a href="#Lea">Lea</a>&nbsp;instance;<br>
-&nbsp;the&nbsp;Ilea&nbsp;subclass&nbsp;filters&nbsp;the&nbsp;values&nbsp;of&nbsp;a&nbsp;given&nbsp;<a href="#Lea">Lea</a>&nbsp;instance&nbsp;by&nbsp;applying&nbsp;a&nbsp;given&nbsp;boolean&nbsp;condition;<br>
-&nbsp;the&nbsp;Olea&nbsp;subclass&nbsp;builds&nbsp;a&nbsp;joint&nbsp;probability&nbsp;distribution&nbsp;from&nbsp;a&nbsp;<a href="#Lea">Lea</a>&nbsp;instance&nbsp;with&nbsp;tuples&nbsp;as&nbsp;values;<br>
-&nbsp;the&nbsp;Dlea&nbsp;subclass&nbsp;performs&nbsp;a&nbsp;given&nbsp;number&nbsp;of&nbsp;draws&nbsp;without&nbsp;replacement&nbsp;on&nbsp;a&nbsp;given&nbsp;<a href="#Lea">Lea</a>&nbsp;instance.<br>
-&nbsp;the&nbsp;Mlea&nbsp;subclass&nbsp;merges&nbsp;several&nbsp;<a href="#Lea">Lea</a>&nbsp;instances&nbsp;together<br>
-&nbsp;The&nbsp;Rlea&nbsp;subclass&nbsp;manages&nbsp;<a href="#Lea">Lea</a>&nbsp;instances&nbsp;containing&nbsp;other&nbsp;<a href="#Lea">Lea</a>&nbsp;instances&nbsp;as&nbsp;values<br>
-&nbsp;The&nbsp;Blea&nbsp;subclass&nbsp;defines&nbsp;CPT&nbsp;providing&nbsp;<a href="#Lea">Lea</a>&nbsp;instances&nbsp;corresponding&nbsp;to&nbsp;given&nbsp;conditions<br>
&nbsp;<br>
WARNING:&nbsp;The&nbsp;following&nbsp;methods&nbsp;are&nbsp;called&nbsp;without&nbsp;parentheses:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mean,&nbsp;var,&nbsp;std,&nbsp;mode,&nbsp;entropy,&nbsp;information<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;These&nbsp;are&nbsp;applicable&nbsp;on&nbsp;any&nbsp;<a href="#Lea">Lea</a>&nbsp;instance;&nbsp;these&nbsp;are&nbsp;documented&nbsp;in&nbsp;the&nbsp;Alea&nbsp;class<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Lea-__abs__"><strong>__abs__</strong></a>(self)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;applying&nbsp;the&nbsp;abs&nbsp;function&nbsp;on&nbsp;the&nbsp;values&nbsp;of&nbsp;self;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"abs(self)"</tt></dd></dl>

<dl><dt><a name="Lea-__add__"><strong>__add__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;addition&nbsp;of&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;with&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;+&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-__and__"><strong>__and__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;boolean&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;locical&nbsp;AND&nbsp;between&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;and&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;&amp;&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-__call__"><strong>__call__</strong></a>(self, *args)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
of&nbsp;values&nbsp;returned&nbsp;by&nbsp;invoking&nbsp;functions&nbsp;of&nbsp;current&nbsp;distribution&nbsp;on&nbsp;<br>
given&nbsp;arguments&nbsp;(assuming&nbsp;that&nbsp;the&nbsp;values&nbsp;of&nbsp;current&nbsp;distribution&nbsp;are<br>
functions);<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self(*args)"</tt></dd></dl>

<dl><dt><a name="Lea-__div__"><strong>__div__</strong></a> = <a href="#Lea-__truediv__">__truediv__</a>(self, other)</dt></dl>

<dl><dt><a name="Lea-__divmod__"><strong>__divmod__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;applying&nbsp;the&nbsp;function&nbsp;divmod&nbsp;on&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;and&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"divmod(self,other)"</tt></dd></dl>

<dl><dt><a name="Lea-__eq__"><strong>__eq__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;boolean&nbsp;probability&nbsp;distribution<br>
that&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;are&nbsp;equal&nbsp;to&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;==&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-__floordiv__"><strong>__floordiv__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;integer&nbsp;division&nbsp;of&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;by&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;//&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-__ge__"><strong>__ge__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;boolean&nbsp;probability&nbsp;distribution<br>
that&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;are&nbsp;greater&nbsp;than&nbsp;or&nbsp;equal&nbsp;to&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;&gt;=&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-__getattribute__"><strong>__getattribute__</strong></a>(self, attrName)</dt><dd><tt>returns&nbsp;the&nbsp;attribute&nbsp;with&nbsp;the&nbsp;given&nbsp;name&nbsp;in&nbsp;the&nbsp;current&nbsp;<a href="#Lea">Lea</a>&nbsp;instance;<br>
if&nbsp;the&nbsp;attribute&nbsp;name&nbsp;is&nbsp;a&nbsp;distribution&nbsp;indicator,&nbsp;then&nbsp;the&nbsp;distribution<br>
is&nbsp;evaluated&nbsp;and&nbsp;the&nbsp;indicator&nbsp;method&nbsp;is&nbsp;called;&nbsp;<br>
if&nbsp;the&nbsp;attribute&nbsp;name&nbsp;is&nbsp;unknown&nbsp;as&nbsp;a&nbsp;<a href="#Lea">Lea</a>&nbsp;instance's&nbsp;attribute,<br>
then&nbsp;returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;that&nbsp;shall&nbsp;retrieve&nbsp;the&nbsp;attibute&nbsp;in&nbsp;the<br>
values&nbsp;of&nbsp;current&nbsp;distribution;&nbsp;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self.<strong>attrName</strong>"<br>
WARNING:&nbsp;the&nbsp;following&nbsp;methods&nbsp;are&nbsp;called&nbsp;without&nbsp;parentheses:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mean,&nbsp;var,&nbsp;std,&nbsp;mode,&nbsp;entropy,&nbsp;information<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;these&nbsp;are&nbsp;applicable&nbsp;on&nbsp;any&nbsp;<a href="#Lea">Lea</a>&nbsp;instance<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;these&nbsp;are&nbsp;documented&nbsp;in&nbsp;the&nbsp;Alea&nbsp;class</tt></dd></dl>

<dl><dt><a name="Lea-__getitem__"><strong>__getitem__</strong></a>(self, index)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
obtained&nbsp;by&nbsp;indexing&nbsp;or&nbsp;slicing&nbsp;each&nbsp;value&nbsp;with&nbsp;index<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self[index]"</tt></dd></dl>

<dl><dt><a name="Lea-__gt__"><strong>__gt__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;boolean&nbsp;probability&nbsp;distribution<br>
that&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;are&nbsp;greater&nbsp;than&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;&gt;&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-__hash__"><strong>__hash__</strong></a>(self)</dt></dl>

<dl><dt><a name="Lea-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>initializes&nbsp;<a href="#Lea">Lea</a>&nbsp;instance's&nbsp;attributes</tt></dd></dl>

<dl><dt><a name="Lea-__invert__"><strong>__invert__</strong></a>(self)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;boolean&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;locical&nbsp;NOT&nbsp;of&nbsp;the&nbsp;values&nbsp;self;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"~self"</tt></dd></dl>

<dl><dt><a name="Lea-__iter__"><strong>__iter__</strong></a>(self)</dt><dd><tt>returns&nbsp;the&nbsp;iterator&nbsp;returned&nbsp;by&nbsp;genVP()<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"iter(self)",&nbsp;"tuple(self)",&nbsp;"list(self"&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;on&nbsp;"for&nbsp;x&nbsp;in&nbsp;self"</tt></dd></dl>

<dl><dt><a name="Lea-__le__"><strong>__le__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;boolean&nbsp;probability&nbsp;distribution<br>
that&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;are&nbsp;less&nbsp;than&nbsp;or&nbsp;equal&nbsp;to&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;&lt;=&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-__lt__"><strong>__lt__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;boolean&nbsp;probability&nbsp;distribution<br>
that&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;are&nbsp;less&nbsp;than&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;&lt;&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-__mod__"><strong>__mod__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;modulus&nbsp;of&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;with&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;%&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-__mul__"><strong>__mul__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;multiplication&nbsp;of&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;by&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;*&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-__ne__"><strong>__ne__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;boolean&nbsp;probability&nbsp;distribution<br>
that&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;are&nbsp;different&nbsp;from&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;!=&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-__neg__"><strong>__neg__</strong></a>(self)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;negating&nbsp;the&nbsp;values&nbsp;of&nbsp;self;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"-self"</tt></dd></dl>

<dl><dt><a name="Lea-__nonzero__"><strong>__nonzero__</strong></a>(self)</dt><dd><tt>raises&nbsp;an&nbsp;exception&nbsp;telling&nbsp;that&nbsp;<a href="#Lea">Lea</a>&nbsp;instance&nbsp;cannot&nbsp;be&nbsp;evaluated&nbsp;as&nbsp;a&nbsp;boolean<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"bool(self)"</tt></dd></dl>

<dl><dt><a name="Lea-__or__"><strong>__or__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;boolean&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;locical&nbsp;OR&nbsp;between&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;and&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;|&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-__pos__"><strong>__pos__</strong></a>(self)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;applying&nbsp;the&nbsp;unary&nbsp;positive&nbsp;operator&nbsp;on&nbsp;the&nbsp;values&nbsp;of&nbsp;self;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"+self"</tt></dd></dl>

<dl><dt><a name="Lea-__pow__"><strong>__pow__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;powering&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;with&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;**&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-__radd__"><strong>__radd__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;addition&nbsp;of&nbsp;the&nbsp;values&nbsp;of&nbsp;other&nbsp;with&nbsp;the&nbsp;values&nbsp;of&nbsp;self;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"other&nbsp;+&nbsp;self"</tt></dd></dl>

<dl><dt><a name="Lea-__rand__"><strong>__rand__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;boolean&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;locical&nbsp;AND&nbsp;between&nbsp;the&nbsp;values&nbsp;of&nbsp;other&nbsp;and&nbsp;the&nbsp;values&nbsp;of&nbsp;self;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"other&nbsp;&amp;&nbsp;self"</tt></dd></dl>

<dl><dt><a name="Lea-__rdiv__"><strong>__rdiv__</strong></a> = <a href="#Lea-__rtruediv__">__rtruediv__</a>(self, other)</dt></dl>

<dl><dt><a name="Lea-__rdivmod__"><strong>__rdivmod__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;applying&nbsp;the&nbsp;function&nbsp;divmod&nbsp;on&nbsp;the&nbsp;values&nbsp;of&nbsp;other&nbsp;and&nbsp;the&nbsp;values&nbsp;of&nbsp;self;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"divmod(other,self)"</tt></dd></dl>

<dl><dt><a name="Lea-__repr__"><strong>__repr__</strong></a> = <a href="#Lea-__str__">__str__</a>(self)</dt></dl>

<dl><dt><a name="Lea-__rfloordiv__"><strong>__rfloordiv__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;integer&nbsp;division&nbsp;of&nbsp;the&nbsp;values&nbsp;of&nbsp;other&nbsp;by&nbsp;the&nbsp;values&nbsp;of&nbsp;self;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"other&nbsp;//&nbsp;self"</tt></dd></dl>

<dl><dt><a name="Lea-__rmod__"><strong>__rmod__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;modulus&nbsp;of&nbsp;the&nbsp;values&nbsp;of&nbsp;other&nbsp;with&nbsp;the&nbsp;values&nbsp;of&nbsp;self;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"other&nbsp;%&nbsp;self"</tt></dd></dl>

<dl><dt><a name="Lea-__rmul__"><strong>__rmul__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;multiplication&nbsp;of&nbsp;the&nbsp;values&nbsp;of&nbsp;other&nbsp;by&nbsp;the&nbsp;values&nbsp;of&nbsp;self;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"other&nbsp;*&nbsp;self"</tt></dd></dl>

<dl><dt><a name="Lea-__ror__"><strong>__ror__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;boolean&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;locical&nbsp;OR&nbsp;between&nbsp;the&nbsp;values&nbsp;of&nbsp;other&nbsp;and&nbsp;the&nbsp;values&nbsp;of&nbsp;self;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"other&nbsp;|&nbsp;self"</tt></dd></dl>

<dl><dt><a name="Lea-__rpow__"><strong>__rpow__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;powering&nbsp;the&nbsp;values&nbsp;of&nbsp;other&nbsp;with&nbsp;the&nbsp;values&nbsp;of&nbsp;self;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"other&nbsp;**&nbsp;self"</tt></dd></dl>

<dl><dt><a name="Lea-__rsub__"><strong>__rsub__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;subtraction&nbsp;of&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;from&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"other&nbsp;-&nbsp;self"</tt></dd></dl>

<dl><dt><a name="Lea-__rtruediv__"><strong>__rtruediv__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;division&nbsp;of&nbsp;the&nbsp;values&nbsp;of&nbsp;other&nbsp;by&nbsp;the&nbsp;values&nbsp;of&nbsp;self;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"other&nbsp;/&nbsp;self"</tt></dd></dl>

<dl><dt><a name="Lea-__str__"><strong>__str__</strong></a>(self)</dt><dd><tt>returns,&nbsp;after&nbsp;evaluation&nbsp;of&nbsp;the&nbsp;probability&nbsp;distribution&nbsp;self,&nbsp;a&nbsp;string<br>
representation&nbsp;of&nbsp;it;<br>
it&nbsp;contains&nbsp;one&nbsp;line&nbsp;per&nbsp;distinct&nbsp;value,&nbsp;separated&nbsp;by&nbsp;a&nbsp;newline&nbsp;character;<br>
each&nbsp;line&nbsp;contains&nbsp;the&nbsp;string&nbsp;representation&nbsp;of&nbsp;a&nbsp;value&nbsp;&nbsp;with&nbsp;its<br>
probability&nbsp;expressed&nbsp;as&nbsp;a&nbsp;rational&nbsp;number&nbsp;"n/d"&nbsp;or&nbsp;"0"&nbsp;or&nbsp;"1";<br>
if&nbsp;an&nbsp;order&nbsp;relationship&nbsp;is&nbsp;defined&nbsp;on&nbsp;values,&nbsp;then&nbsp;the&nbsp;values&nbsp;are&nbsp;sorted&nbsp;by&nbsp;<br>
increasing&nbsp;order;&nbsp;otherwise,&nbsp;an&nbsp;arbitrary&nbsp;order&nbsp;is&nbsp;used;<br>
called&nbsp;on&nbsp;evalution&nbsp;of&nbsp;"str(self)"&nbsp;and&nbsp;"repr(self)"</tt></dd></dl>

<dl><dt><a name="Lea-__sub__"><strong>__sub__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;subtraction&nbsp;of&nbsp;the&nbsp;values&nbsp;of&nbsp;other&nbsp;from&nbsp;the&nbsp;values&nbsp;of&nbsp;self;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;-&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-__truediv__"><strong>__truediv__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;division&nbsp;of&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;by&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;/&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-__xor__"><strong>__xor__</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;boolean&nbsp;probability&nbsp;distribution<br>
resulting&nbsp;from&nbsp;the&nbsp;locical&nbsp;XOR&nbsp;between&nbsp;the&nbsp;values&nbsp;of&nbsp;self&nbsp;and&nbsp;the&nbsp;values&nbsp;of&nbsp;other;<br>
called&nbsp;on&nbsp;evaluation&nbsp;of&nbsp;"self&nbsp;^&nbsp;other"</tt></dd></dl>

<dl><dt><a name="Lea-asFloat"><strong>asFloat</strong></a>(self, nbDecimals<font color="#909090">=6</font>)</dt><dd><tt>returns,&nbsp;after&nbsp;evaluation&nbsp;of&nbsp;the&nbsp;probability&nbsp;distribution&nbsp;self,&nbsp;a&nbsp;string<br>
representation&nbsp;of&nbsp;it;<br>
it&nbsp;contains&nbsp;one&nbsp;line&nbsp;per&nbsp;distinct&nbsp;value,&nbsp;separated&nbsp;by&nbsp;a&nbsp;newline&nbsp;character;<br>
each&nbsp;line&nbsp;contains&nbsp;the&nbsp;string&nbsp;representation&nbsp;of&nbsp;a&nbsp;value&nbsp;with&nbsp;its<br>
probability&nbsp;expressed&nbsp;as&nbsp;decimal&nbsp;with&nbsp;given&nbsp;nbDecimals&nbsp;digits;<br>
if&nbsp;an&nbsp;order&nbsp;relationship&nbsp;is&nbsp;defined&nbsp;on&nbsp;values,&nbsp;then&nbsp;the&nbsp;values&nbsp;are&nbsp;sorted&nbsp;by&nbsp;<br>
increasing&nbsp;order;&nbsp;otherwise,&nbsp;an&nbsp;arbitrary&nbsp;order&nbsp;is&nbsp;used;</tt></dd></dl>

<dl><dt><a name="Lea-asJoint"><strong>asJoint</strong></a>(self, *attrNames)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Olea&nbsp;instance&nbsp;representing&nbsp;a&nbsp;joint&nbsp;probability&nbsp;distribution<br>
from&nbsp;the&nbsp;current&nbsp;distribution&nbsp;supposed&nbsp;to&nbsp;have&nbsp;n-tuples&nbsp;as&nbsp;values,<br>
to&nbsp;be&nbsp;associated&nbsp;with&nbsp;the&nbsp;given&nbsp;n&nbsp;attribute&nbsp;names</tt></dd></dl>

<dl><dt><a name="Lea-asPct"><strong>asPct</strong></a>(self, nbDecimals<font color="#909090">=1</font>)</dt><dd><tt>returns,&nbsp;after&nbsp;evaluation&nbsp;of&nbsp;the&nbsp;probability&nbsp;distribution&nbsp;self,&nbsp;a&nbsp;string<br>
representation&nbsp;of&nbsp;it;<br>
it&nbsp;contains&nbsp;one&nbsp;line&nbsp;per&nbsp;distinct&nbsp;value,&nbsp;separated&nbsp;by&nbsp;a&nbsp;newline&nbsp;character;<br>
each&nbsp;line&nbsp;contains&nbsp;the&nbsp;string&nbsp;representation&nbsp;of&nbsp;a&nbsp;value&nbsp;with&nbsp;its<br>
probability&nbsp;expressed&nbsp;as&nbsp;percentage&nbsp;with&nbsp;given&nbsp;nbDecimals&nbsp;digits;<br>
if&nbsp;an&nbsp;order&nbsp;relationship&nbsp;is&nbsp;defined&nbsp;on&nbsp;values,&nbsp;then&nbsp;the&nbsp;values&nbsp;are&nbsp;sorted&nbsp;by&nbsp;<br>
increasing&nbsp;order;&nbsp;otherwise,&nbsp;an&nbsp;arbitrary&nbsp;order&nbsp;is&nbsp;used;</tt></dd></dl>

<dl><dt><a name="Lea-asString"><strong>asString</strong></a>(self, kind<font color="#909090">='/'</font>, nbDecimals<font color="#909090">=6</font>, chartSize<font color="#909090">=100</font>)</dt><dd><tt>returns,&nbsp;after&nbsp;evaluation&nbsp;of&nbsp;the&nbsp;probability&nbsp;distribution&nbsp;self,&nbsp;a&nbsp;string<br>
representation&nbsp;of&nbsp;it;<br>
it&nbsp;contains&nbsp;one&nbsp;line&nbsp;per&nbsp;distinct&nbsp;value,&nbsp;separated&nbsp;by&nbsp;a&nbsp;newline&nbsp;character;<br>
each&nbsp;line&nbsp;contains&nbsp;the&nbsp;string&nbsp;representation&nbsp;of&nbsp;a&nbsp;value&nbsp;with&nbsp;its<br>
probability&nbsp;in&nbsp;a&nbsp;format&nbsp;depending&nbsp;of&nbsp;given&nbsp;kind,&nbsp;which&nbsp;is&nbsp;string&nbsp;among<br>
'/',&nbsp;'.',&nbsp;'%',&nbsp;'-',&nbsp;'/-',&nbsp;'.-',&nbsp;'%-';&nbsp;<br>
the&nbsp;probabilities&nbsp;are&nbsp;displayed&nbsp;as<br>
-&nbsp;if&nbsp;kind[0]&nbsp;is&nbsp;'/'&nbsp;:&nbsp;rational&nbsp;numbers&nbsp;"n/d"&nbsp;or&nbsp;"0"&nbsp;or&nbsp;"1"<br>
-&nbsp;if&nbsp;kind[0]&nbsp;is&nbsp;'.'&nbsp;:&nbsp;decimals&nbsp;with&nbsp;given&nbsp;nbDecimals&nbsp;digits<br>
-&nbsp;if&nbsp;kind[0]&nbsp;is&nbsp;'%'&nbsp;:&nbsp;percentage&nbsp;decimals&nbsp;with&nbsp;given&nbsp;nbDecimals&nbsp;digits<br>
-&nbsp;if&nbsp;kind[0]&nbsp;is&nbsp;'-'&nbsp;:&nbsp;histogram&nbsp;bar&nbsp;made&nbsp;up&nbsp;of&nbsp;repeated&nbsp;'-',&nbsp;such&nbsp;that<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;bar&nbsp;length&nbsp;of&nbsp;histoSize&nbsp;represents&nbsp;a&nbsp;probability&nbsp;1&nbsp;<br>
if&nbsp;kind[1]&nbsp;is&nbsp;'-',&nbsp;the&nbsp;histogram&nbsp;bars&nbsp;with&nbsp;'-'&nbsp;are&nbsp;appended&nbsp;after&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;numerical&nbsp;representation&nbsp;of&nbsp;probabilities<br>
if&nbsp;an&nbsp;order&nbsp;relationship&nbsp;is&nbsp;defined&nbsp;on&nbsp;values,&nbsp;then&nbsp;the&nbsp;values&nbsp;are&nbsp;sorted&nbsp;by&nbsp;<br>
increasing&nbsp;order;&nbsp;otherwise,&nbsp;an&nbsp;arbitrary&nbsp;order&nbsp;is&nbsp;used</tt></dd></dl>

<dl><dt><a name="Lea-cdf"><strong>cdf</strong></a>(self, val<font color="#909090">=None</font>)</dt><dd><tt>cumulative&nbsp;distribution&nbsp;function<br>
returns&nbsp;the&nbsp;probability&nbsp;that&nbsp;self's&nbsp;value&nbsp;is&nbsp;less&nbsp;or&nbsp;equal&nbsp;to&nbsp;the&nbsp;given&nbsp;value&nbsp;val,<br>
as&nbsp;a&nbsp;floating&nbsp;point&nbsp;number&nbsp;from&nbsp;0.0&nbsp;to&nbsp;1.0<br>
if&nbsp;val&nbsp;is&nbsp;None,&nbsp;then&nbsp;a&nbsp;tuple&nbsp;is&nbsp;returned&nbsp;with&nbsp;the&nbsp;probabilities&nbsp;of&nbsp;each&nbsp;value,<br>
in&nbsp;the&nbsp;same&nbsp;order&nbsp;as&nbsp;defined&nbsp;on&nbsp;values&nbsp;(call&nbsp;vals&nbsp;method&nbsp;to&nbsp;get&nbsp;this&nbsp;<br>
ordered&nbsp;sequence);&nbsp;the&nbsp;last&nbsp;probability&nbsp;is&nbsp;always&nbsp;1.0</tt></dd></dl>

<dl><dt><a name="Lea-clone"><strong>clone</strong></a>(self, cloneTable<font color="#909090">=None</font>)</dt><dd><tt>returns&nbsp;a&nbsp;deep&nbsp;copy&nbsp;of&nbsp;current&nbsp;<a href="#Lea">Lea</a>,&nbsp;without&nbsp;any&nbsp;value&nbsp;binding;<br>
if&nbsp;the&nbsp;<a href="#Lea">Lea</a>&nbsp;tree&nbsp;contains&nbsp;multiple&nbsp;references&nbsp;to&nbsp;the&nbsp;same&nbsp;<a href="#Lea">Lea</a>&nbsp;instance,<br>
then&nbsp;it&nbsp;is&nbsp;cloned&nbsp;only&nbsp;once&nbsp;and&nbsp;the&nbsp;references&nbsp;are&nbsp;copied&nbsp;in&nbsp;the&nbsp;cloned&nbsp;tree<br>
(the&nbsp;cloneTable&nbsp;dictionary&nbsp;serves&nbsp;this&nbsp;purpose);<br>
the&nbsp;method&nbsp;calls&nbsp;the&nbsp;_clone()&nbsp;method&nbsp;implemented&nbsp;in&nbsp;<a href="#Lea">Lea</a>&nbsp;subclasses</tt></dd></dl>

<dl><dt><a name="Lea-cprod"><strong>cprod</strong></a>(self, *args)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Clea&nbsp;instance,&nbsp;representing&nbsp;the&nbsp;cartesian&nbsp;product&nbsp;of&nbsp;all<br>
arguments&nbsp;(coerced&nbsp;to&nbsp;<a href="#Lea">Lea</a>&nbsp;instances),&nbsp;including&nbsp;self&nbsp;as&nbsp;first&nbsp;argument</tt></dd></dl>

<dl><dt><a name="Lea-cprodTimes"><strong>cprodTimes</strong></a>(self, nTimes)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Plea&nbsp;instance,&nbsp;representing&nbsp;the&nbsp;cartesian&nbsp;product&nbsp;of&nbsp;self<br>
with&nbsp;itself,&nbsp;iterated&nbsp;nTimes</tt></dd></dl>

<dl><dt><a name="Lea-cumul"><strong>cumul</strong></a>(self)</dt><dd><tt>evaluates&nbsp;the&nbsp;distribution,&nbsp;then,<br>
returns&nbsp;a&nbsp;tuple&nbsp;with&nbsp;probability&nbsp;weights&nbsp;p&nbsp;that&nbsp;self&nbsp;&lt;=&nbsp;value&nbsp;;<br>
the&nbsp;sequence&nbsp;follows&nbsp;the&nbsp;order&nbsp;defined&nbsp;on&nbsp;values&nbsp;(if&nbsp;an&nbsp;order&nbsp;relationship&nbsp;is&nbsp;defined<br>
on&nbsp;values,&nbsp;then&nbsp;the&nbsp;tuples&nbsp;follows&nbsp;their&nbsp;increasing&nbsp;order;&nbsp;otherwise,&nbsp;an&nbsp;arbitrary<br>
order&nbsp;is&nbsp;used,&nbsp;fixed&nbsp;from&nbsp;call&nbsp;to&nbsp;call<br>
Note&nbsp;:&nbsp;the&nbsp;returned&nbsp;value&nbsp;is&nbsp;cached</tt></dd></dl>

<dl><dt><a name="Lea-draw"><strong>draw</strong></a>(self, nbValues)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Dlea&nbsp;instance&nbsp;representing&nbsp;a&nbsp;probability&nbsp;distribution&nbsp;of&nbsp;the<br>
sequences&nbsp;of&nbsp;values&nbsp;obtained&nbsp;by&nbsp;the&nbsp;given&nbsp;number&nbsp;of&nbsp;draws&nbsp;without<br>
replacement&nbsp;from&nbsp;the&nbsp;current&nbsp;distribution</tt></dd></dl>

<dl><dt><a name="Lea-equiv"><strong>equiv</strong></a>(self, other)</dt><dd><tt>returns&nbsp;True&nbsp;iff&nbsp;self&nbsp;and&nbsp;other&nbsp;represent&nbsp;the&nbsp;same&nbsp;probability&nbsp;distribution,<br>
i.e.&nbsp;they&nbsp;have&nbsp;the&nbsp;same&nbsp;probability&nbsp;for&nbsp;each&nbsp;of&nbsp;their&nbsp;value<br>
returns&nbsp;False&nbsp;otherwise</tt></dd></dl>

<dl><dt><a name="Lea-flat"><strong>flat</strong></a>(self)</dt><dd><tt>assuming&nbsp;that&nbsp;self's&nbsp;values&nbsp;are&nbsp;themselves&nbsp;<a href="#Lea">Lea</a>&nbsp;instances,<br>
returns&nbsp;a&nbsp;new&nbsp;Rlea&nbsp;instance&nbsp;representing&nbsp;a&nbsp;probability&nbsp;distribution&nbsp;of<br>
inner&nbsp;values&nbsp;of&nbsp;these&nbsp;<a href="#Lea">Lea</a>&nbsp;instances</tt></dd></dl>

<dl><dt><a name="Lea-genVPs"><strong>genVPs</strong></a>(self)</dt><dd><tt>generates&nbsp;tuple&nbsp;(v,p)&nbsp;where&nbsp;v&nbsp;is&nbsp;a&nbsp;value&nbsp;of&nbsp;the&nbsp;current&nbsp;probability&nbsp;distribution<br>
and&nbsp;p&nbsp;is&nbsp;the&nbsp;associated&nbsp;probability&nbsp;weight&nbsp;(integer&nbsp;&gt;&nbsp;0);<br>
before&nbsp;yielding&nbsp;a&nbsp;value&nbsp;v,&nbsp;this&nbsp;value&nbsp;is&nbsp;bound&nbsp;to&nbsp;the&nbsp;current&nbsp;instance;<br>
then,&nbsp;if&nbsp;the&nbsp;current&nbsp;calculation&nbsp;requires&nbsp;to&nbsp;get&nbsp;again&nbsp;values&nbsp;on&nbsp;the&nbsp;current<br>
instance,&nbsp;then&nbsp;the&nbsp;bound&nbsp;value&nbsp;is&nbsp;yielded&nbsp;with&nbsp;probability&nbsp;1;<br>
the&nbsp;instance&nbsp;is&nbsp;rebound&nbsp;to&nbsp;a&nbsp;new&nbsp;value&nbsp;at&nbsp;each&nbsp;iteration,&nbsp;as&nbsp;soon&nbsp;as&nbsp;the&nbsp;execution<br>
is&nbsp;resumed&nbsp;after&nbsp;the&nbsp;yield;<br>
it&nbsp;is&nbsp;unbound&nbsp;at&nbsp;the&nbsp;end;<br>
the&nbsp;method&nbsp;calls&nbsp;the&nbsp;_genVPs&nbsp;method&nbsp;implemented&nbsp;in&nbsp;<a href="#Lea">Lea</a>&nbsp;subclasses;</tt></dd></dl>

<dl><dt><a name="Lea-getAlea"><strong>getAlea</strong></a>(self)</dt><dd><tt>returns&nbsp;an&nbsp;Alea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;distribution&nbsp;after&nbsp;it&nbsp;has&nbsp;been&nbsp;evaluated;<br>
Note&nbsp;:&nbsp;the&nbsp;returned&nbsp;value&nbsp;is&nbsp;cached&nbsp;(the&nbsp;evaluation&nbsp;occurs&nbsp;only&nbsp;for&nbsp;the&nbsp;first&nbsp;call,<br>
for&nbsp;successive&nbsp;calls,&nbsp;a&nbsp;cached&nbsp;Alea&nbsp;instance&nbsp;is&nbsp;returned,&nbsp;which&nbsp;is&nbsp;faster)</tt></dd></dl>

<dl><dt><a name="Lea-getAleaClone"><strong>getAleaClone</strong></a>(self)</dt><dd><tt>same&nbsp;as&nbsp;getAlea&nbsp;method,&nbsp;excepting&nbsp;if&nbsp;applied&nbsp;on&nbsp;an&nbsp;Alea&nbsp;instance:<br>
in&nbsp;this&nbsp;case,&nbsp;a&nbsp;clone&nbsp;of&nbsp;the&nbsp;Alea&nbsp;instance&nbsp;is&nbsp;returned&nbsp;(insead&nbsp;of&nbsp;itself)</tt></dd></dl>

<dl><dt><a name="Lea-getAleaLeavesSet"><strong>getAleaLeavesSet</strong></a>(self)</dt><dd><tt>returns&nbsp;a&nbsp;set&nbsp;containing&nbsp;all&nbsp;the&nbsp;Alea&nbsp;leaves&nbsp;in&nbsp;the&nbsp;tree&nbsp;having&nbsp;the&nbsp;root&nbsp;self;<br>
this&nbsp;calls&nbsp;_getLeaChildren()&nbsp;method&nbsp;implemented&nbsp;in&nbsp;<a href="#Lea">Lea</a>&nbsp;subclasses;<br>
this&nbsp;method&nbsp;is&nbsp;overloaded&nbsp;in&nbsp;Alea&nbsp;subclass&nbsp;to&nbsp;stop&nbsp;the&nbsp;recursion</tt></dd></dl>

<dl><dt><a name="Lea-given"><strong>given</strong></a>(self, info)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Ilea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;current&nbsp;distribution<br>
updated&nbsp;with&nbsp;the&nbsp;given&nbsp;info,&nbsp;which&nbsp;is&nbsp;either&nbsp;a&nbsp;boolean&nbsp;or&nbsp;a&nbsp;<a href="#Lea">Lea</a>&nbsp;instance<br>
with&nbsp;boolean&nbsp;values;&nbsp;the&nbsp;values&nbsp;present&nbsp;in&nbsp;the&nbsp;returned&nbsp;distribution&nbsp;<br>
are&nbsp;those&nbsp;and&nbsp;only&nbsp;those&nbsp;compatible&nbsp;with&nbsp;the&nbsp;given&nbsp;info<br>
The&nbsp;resulting&nbsp;(value,probability)&nbsp;pairs&nbsp;are&nbsp;calculated&nbsp;<br>
when&nbsp;the&nbsp;returned&nbsp;Ilea&nbsp;instance&nbsp;is&nbsp;evaluated;&nbsp;if&nbsp;no&nbsp;value&nbsp;is&nbsp;found,<br>
then&nbsp;an&nbsp;exception&nbsp;is&nbsp;raised</tt></dd></dl>

<dl><dt><a name="Lea-histo"><strong>histo</strong></a>(self, size<font color="#909090">=100</font>)</dt><dd><tt>returns,&nbsp;after&nbsp;evaluation&nbsp;of&nbsp;the&nbsp;probability&nbsp;distribution&nbsp;self,&nbsp;a&nbsp;string<br>
representation&nbsp;of&nbsp;it;<br>
it&nbsp;contains&nbsp;one&nbsp;line&nbsp;per&nbsp;distinct&nbsp;value,&nbsp;separated&nbsp;by&nbsp;a&nbsp;newline&nbsp;character;<br>
each&nbsp;line&nbsp;contains&nbsp;the&nbsp;string&nbsp;representation&nbsp;of&nbsp;a&nbsp;value&nbsp;with&nbsp;its<br>
probability&nbsp;expressed&nbsp;as&nbsp;a&nbsp;histogram&nbsp;bar&nbsp;made&nbsp;up&nbsp;of&nbsp;repeated&nbsp;'-',<br>
such&nbsp;that&nbsp;a&nbsp;bar&nbsp;length&nbsp;of&nbsp;given&nbsp;size&nbsp;represents&nbsp;a&nbsp;probability&nbsp;1<br>
if&nbsp;an&nbsp;order&nbsp;relationship&nbsp;is&nbsp;defined&nbsp;on&nbsp;values,&nbsp;then&nbsp;the&nbsp;values&nbsp;are&nbsp;sorted&nbsp;by&nbsp;<br>
increasing&nbsp;order;&nbsp;otherwise,&nbsp;an&nbsp;arbitrary&nbsp;order&nbsp;is&nbsp;used;</tt></dd></dl>

<dl><dt><a name="Lea-id"><strong>id</strong></a>(self)</dt><dd><tt>returns&nbsp;a&nbsp;unique&nbsp;id,&nbsp;containing&nbsp;the&nbsp;concrete&nbsp;<a href="#Lea">Lea</a>&nbsp;class&nbsp;name&nbsp;as&nbsp;prefix</tt></dd></dl>

<dl><dt><a name="Lea-information"><strong>information</strong></a>(self)</dt><dd><tt>returns&nbsp;a&nbsp;float&nbsp;number&nbsp;representing&nbsp;the&nbsp;information&nbsp;of&nbsp;self&nbsp;being&nbsp;true,<br>
expressed&nbsp;in&nbsp;bits&nbsp;(assuming&nbsp;that&nbsp;self&nbsp;is&nbsp;a&nbsp;boolean&nbsp;distribution)<br>
raises&nbsp;an&nbsp;exception&nbsp;if&nbsp;self&nbsp;is&nbsp;certainly&nbsp;false</tt></dd></dl>

<dl><dt><a name="Lea-informationOf"><strong>informationOf</strong></a>(self, val)</dt><dd><tt>returns&nbsp;a&nbsp;float&nbsp;number&nbsp;representing&nbsp;the&nbsp;information&nbsp;of&nbsp;given&nbsp;val,<br>
expressed&nbsp;in&nbsp;bits<br>
raises&nbsp;an&nbsp;exception&nbsp;if&nbsp;given&nbsp;val&nbsp;is&nbsp;impossible</tt></dd></dl>

<dl><dt><a name="Lea-invCumul"><strong>invCumul</strong></a>(self)</dt><dd><tt>evaluates&nbsp;the&nbsp;distribution,&nbsp;then,<br>
returns&nbsp;a&nbsp;tuple&nbsp;with&nbsp;the&nbsp;probability&nbsp;weights&nbsp;p&nbsp;that&nbsp;self&nbsp;&gt;=&nbsp;value&nbsp;;<br>
the&nbsp;sequence&nbsp;follows&nbsp;the&nbsp;order&nbsp;defined&nbsp;on&nbsp;values&nbsp;(if&nbsp;an&nbsp;order&nbsp;relationship&nbsp;is&nbsp;defined<br>
on&nbsp;values,&nbsp;then&nbsp;the&nbsp;tuples&nbsp;follows&nbsp;their&nbsp;increasing&nbsp;order;&nbsp;otherwise,&nbsp;an&nbsp;arbitrary<br>
order&nbsp;is&nbsp;used,&nbsp;fixed&nbsp;from&nbsp;call&nbsp;to&nbsp;call<br>
Note&nbsp;:&nbsp;the&nbsp;returned&nbsp;value&nbsp;is&nbsp;cached</tt></dd></dl>

<dl><dt><a name="Lea-isAnyOf"><strong>isAnyOf</strong></a>(self, *values)</dt><dd><tt>returns&nbsp;a&nbsp;boolean&nbsp;probability&nbsp;distribution<br>
indicating&nbsp;the&nbsp;probability&nbsp;that&nbsp;a&nbsp;value&nbsp;is&nbsp;any&nbsp;of&nbsp;the&nbsp;values&nbsp;passed&nbsp;as&nbsp;arguments</tt></dd></dl>

<dl><dt><a name="Lea-isFeasible"><strong>isFeasible</strong></a>(self)</dt><dd><tt>returns&nbsp;True&nbsp;iff&nbsp;the&nbsp;value&nbsp;True&nbsp;has&nbsp;a&nbsp;non-null&nbsp;probability;<br>
returns&nbsp;False&nbsp;otherwise;<br>
raises&nbsp;exception&nbsp;if&nbsp;some&nbsp;value&nbsp;are&nbsp;not&nbsp;booleans</tt></dd></dl>

<dl><dt><a name="Lea-isNoneOf"><strong>isNoneOf</strong></a>(self, *values)</dt><dd><tt>returns&nbsp;a&nbsp;boolean&nbsp;probability&nbsp;distribution<br>
indicating&nbsp;the&nbsp;probability&nbsp;that&nbsp;a&nbsp;value&nbsp;is&nbsp;none&nbsp;of&nbsp;the&nbsp;given&nbsp;values&nbsp;passed&nbsp;as&nbsp;arguments</tt></dd></dl>

<dl><dt><a name="Lea-isTrue"><strong>isTrue</strong></a>(self)</dt><dd><tt>returns&nbsp;True&nbsp;iff&nbsp;the&nbsp;value&nbsp;True&nbsp;has&nbsp;probability&nbsp;1;<br>
returns&nbsp;False&nbsp;otherwise</tt></dd></dl>

<dl><dt><a name="Lea-map"><strong>map</strong></a>(self, f, args<font color="#909090">=()</font>)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;distribution&nbsp;obtained<br>
by&nbsp;applying&nbsp;the&nbsp;given&nbsp;function&nbsp;f,&nbsp;taking&nbsp;values&nbsp;of&nbsp;self&nbsp;distribution<br>
as&nbsp;first&nbsp;argument&nbsp;and&nbsp;given&nbsp;args&nbsp;tuple&nbsp;as&nbsp;following&nbsp;arguments&nbsp;(expanded);<br>
requires&nbsp;that&nbsp;f&nbsp;is&nbsp;a&nbsp;n-ary&nbsp;function&nbsp;with&nbsp;1&nbsp;&lt;=&nbsp;n&nbsp;=&nbsp;len(args)+1&nbsp;<br>
note:&nbsp;f&nbsp;can&nbsp;be&nbsp;also&nbsp;a&nbsp;<a href="#Lea">Lea</a>&nbsp;instance,&nbsp;with&nbsp;functions&nbsp;as&nbsp;values</tt></dd></dl>

<dl><dt><a name="Lea-mapSeq"><strong>mapSeq</strong></a>(self, f, args<font color="#909090">=()</font>)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Flea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;distribution&nbsp;obtained<br>
by&nbsp;applying&nbsp;the&nbsp;given&nbsp;function&nbsp;f&nbsp;on&nbsp;each&nbsp;element&nbsp;of&nbsp;each&nbsp;value<br>
of&nbsp;self&nbsp;distribution;&nbsp;if&nbsp;args&nbsp;is&nbsp;not&nbsp;empty,&nbsp;then&nbsp;it&nbsp;is&nbsp;expanded<br>
and&nbsp;added&nbsp;as&nbsp;f&nbsp;arguments<br>
requires&nbsp;that&nbsp;f&nbsp;is&nbsp;a&nbsp;n-ary&nbsp;function&nbsp;with&nbsp;1&nbsp;&lt;=&nbsp;n&nbsp;=&nbsp;len(args)+1&nbsp;<br>
requires&nbsp;that&nbsp;self's&nbsp;values&nbsp;are&nbsp;sequences<br>
returned&nbsp;distribution&nbsp;values&nbsp;are&nbsp;tuples<br>
note:&nbsp;f&nbsp;can&nbsp;be&nbsp;also&nbsp;a&nbsp;<a href="#Lea">Lea</a>&nbsp;instance,&nbsp;with&nbsp;functions&nbsp;as&nbsp;values</tt></dd></dl>

<dl><dt><a name="Lea-merge"><strong>merge</strong></a>(self, *leaArgs)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Mlea&nbsp;instance,&nbsp;representing&nbsp;the&nbsp;merge&nbsp;of&nbsp;given&nbsp;leaArgs,&nbsp;i.e.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;P(v)&nbsp;=&nbsp;(P1(v)&nbsp;+&nbsp;...&nbsp;+&nbsp;Pn(v))&nbsp;/&nbsp;n<br>
where&nbsp;P(v)&nbsp;&nbsp;is&nbsp;the&nbsp;probability&nbsp;of&nbsp;value&nbsp;v&nbsp;in&nbsp;the&nbsp;merge&nbsp;result&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pi(v)&nbsp;is&nbsp;the&nbsp;probability&nbsp;of&nbsp;value&nbsp;v&nbsp;in&nbsp;leaArgs[i]</tt></dd></dl>

<dl><dt><a name="Lea-mutualInformation"><strong>mutualInformation</strong></a>(self, other)</dt><dd><tt>returns&nbsp;a&nbsp;float&nbsp;number&nbsp;representing&nbsp;the&nbsp;mutual&nbsp;information&nbsp;between&nbsp;self&nbsp;and&nbsp;other,<br>
expressed&nbsp;in&nbsp;bits</tt></dd></dl>

<dl><dt><a name="Lea-p"><strong>p</strong></a>(self, val<font color="#909090">=None</font>)</dt><dd><tt>returns&nbsp;a&nbsp;ProbFraction&nbsp;instance&nbsp;representing&nbsp;the&nbsp;probability&nbsp;of&nbsp;given&nbsp;value&nbsp;val,<br>
from&nbsp;0/1&nbsp;to&nbsp;1/1<br>
if&nbsp;val&nbsp;is&nbsp;None,&nbsp;then&nbsp;a&nbsp;tuple&nbsp;is&nbsp;returned&nbsp;with&nbsp;the&nbsp;probabilities&nbsp;of&nbsp;each&nbsp;value,<br>
in&nbsp;the&nbsp;same&nbsp;order&nbsp;as&nbsp;defined&nbsp;on&nbsp;values&nbsp;(call&nbsp;vals&nbsp;method&nbsp;to&nbsp;get&nbsp;this&nbsp;<br>
ordered&nbsp;sequence)</tt></dd></dl>

<dl><dt><a name="Lea-pmf"><strong>pmf</strong></a>(self, val<font color="#909090">=None</font>)</dt><dd><tt>probability&nbsp;mass&nbsp;function<br>
returns&nbsp;the&nbsp;probability&nbsp;of&nbsp;the&nbsp;given&nbsp;value&nbsp;val,&nbsp;as&nbsp;a&nbsp;floating&nbsp;point&nbsp;number<br>
from&nbsp;0.0&nbsp;to&nbsp;1.0<br>
if&nbsp;val&nbsp;is&nbsp;None,&nbsp;then&nbsp;a&nbsp;tuple&nbsp;is&nbsp;returned&nbsp;with&nbsp;the&nbsp;probabilities&nbsp;of&nbsp;each&nbsp;value,<br>
in&nbsp;the&nbsp;same&nbsp;order&nbsp;as&nbsp;defined&nbsp;on&nbsp;values&nbsp;(call&nbsp;vals&nbsp;method&nbsp;to&nbsp;get&nbsp;this&nbsp;<br>
ordered&nbsp;sequence)</tt></dd></dl>

<dl><dt><a name="Lea-ps"><strong>ps</strong></a>(self)</dt><dd><tt>returns&nbsp;a&nbsp;tuple&nbsp;with&nbsp;probability&nbsp;weights&nbsp;(integer&nbsp;&gt;&nbsp;0)&nbsp;of&nbsp;self<br>
the&nbsp;sequence&nbsp;follows&nbsp;the&nbsp;increasing&nbsp;order&nbsp;defined&nbsp;on&nbsp;values<br>
if&nbsp;order&nbsp;is&nbsp;undefined&nbsp;(e.g.&nbsp;complex&nbsp;numbers),&nbsp;then&nbsp;the&nbsp;order&nbsp;is<br>
arbitrary&nbsp;but&nbsp;fixed&nbsp;from&nbsp;call&nbsp;to&nbsp;call</tt></dd></dl>

<dl><dt><a name="Lea-random"><strong>random</strong></a>(self, n<font color="#909090">=None</font>)</dt><dd><tt>evaluates&nbsp;the&nbsp;distribution,&nbsp;then,&nbsp;<br>
if&nbsp;n&nbsp;is&nbsp;None,&nbsp;returns&nbsp;a&nbsp;random&nbsp;value&nbsp;with&nbsp;the&nbsp;probability&nbsp;given&nbsp;by&nbsp;the&nbsp;distribution<br>
otherwise,&nbsp;returns&nbsp;a&nbsp;tuple&nbsp;of&nbsp;n&nbsp;such&nbsp;random&nbsp;values</tt></dd></dl>

<dl><dt><a name="Lea-randomDraw"><strong>randomDraw</strong></a>(self, n<font color="#909090">=None</font>, sorted<font color="#909090">=False</font>)</dt><dd><tt>evaluates&nbsp;the&nbsp;distribution,&nbsp;then,<br>
if&nbsp;n=None,&nbsp;then&nbsp;returns&nbsp;a&nbsp;tuple&nbsp;with&nbsp;all&nbsp;the&nbsp;values&nbsp;of&nbsp;the&nbsp;distribution,&nbsp;in&nbsp;a&nbsp;random&nbsp;order<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;respecting&nbsp;the&nbsp;probabilities&nbsp;(the&nbsp;higher&nbsp;count&nbsp;of&nbsp;a&nbsp;value,&nbsp;the&nbsp;most&nbsp;likely<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;value&nbsp;will&nbsp;be&nbsp;in&nbsp;the&nbsp;beginning&nbsp;of&nbsp;the&nbsp;sequence)<br>
if&nbsp;n&nbsp;&gt;&nbsp;0,&nbsp;&nbsp;then&nbsp;returns&nbsp;only&nbsp;n&nbsp;different&nbsp;drawn&nbsp;values<br>
if&nbsp;sorted&nbsp;is&nbsp;True,&nbsp;then&nbsp;the&nbsp;returned&nbsp;tuple&nbsp;is&nbsp;sorted</tt></dd></dl>

<dl><dt><a name="Lea-randomIter"><strong>randomIter</strong></a>(self)</dt><dd><tt>evaluates&nbsp;the&nbsp;distribution,&nbsp;then,<br>
generates&nbsp;an&nbsp;infinite&nbsp;sequence&nbsp;of&nbsp;random&nbsp;values&nbsp;among&nbsp;the&nbsp;values&nbsp;of&nbsp;self,<br>
according&nbsp;to&nbsp;their&nbsp;probabilities</tt></dd></dl>

<dl><dt><a name="Lea-reset"><strong>reset</strong></a>(self)</dt><dd><tt>removes&nbsp;current&nbsp;value&nbsp;binding&nbsp;(to&nbsp;be&nbsp;use&nbsp;only&nbsp;in&nbsp;case&nbsp;of&nbsp;brutal&nbsp;halt&nbsp;of&nbsp;<a href="#Lea-genVPs">genVPs</a>());<br>
this&nbsp;calls&nbsp;_getLeaChildren()&nbsp;method&nbsp;implemented&nbsp;in&nbsp;<a href="#Lea">Lea</a>&nbsp;subclasses</tt></dd></dl>

<dl><dt><a name="Lea-revisedWithCPT"><strong>revisedWithCPT</strong></a>(self, *clauses)</dt><dd><tt>returns&nbsp;an&nbsp;instance&nbsp;of&nbsp;Blea&nbsp;representing&nbsp;the&nbsp;conditional&nbsp;probability&nbsp;table<br>
(e.g.&nbsp;a&nbsp;node&nbsp;in&nbsp;a&nbsp;Bayes&nbsp;network)&nbsp;from&nbsp;the&nbsp;given&nbsp;clauses;<br>
each&nbsp;clause&nbsp;is&nbsp;a&nbsp;tuple&nbsp;(condition,result)<br>
where&nbsp;condition&nbsp;is&nbsp;a&nbsp;boolean&nbsp;or&nbsp;a&nbsp;<a href="#Lea">Lea</a>&nbsp;boolean&nbsp;distribution<br>
&nbsp;&nbsp;and&nbsp;result&nbsp;is&nbsp;a&nbsp;value&nbsp;or&nbsp;<a href="#Lea">Lea</a>&nbsp;distribution&nbsp;representing&nbsp;the&nbsp;result<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assuming&nbsp;that&nbsp;condition&nbsp;is&nbsp;true<br>
the&nbsp;conditions&nbsp;from&nbsp;all&nbsp;clauses&nbsp;shall&nbsp;be&nbsp;mutually&nbsp;exclusive<br>
no&nbsp;clause&nbsp;can&nbsp;contain&nbsp;None&nbsp;as&nbsp;condition<br>
the&nbsp;'else'&nbsp;clause&nbsp;is&nbsp;calculated&nbsp;so&nbsp;that&nbsp;the&nbsp;returned&nbsp;Blea&nbsp;if&nbsp;no&nbsp;condition&nbsp;is&nbsp;given&nbsp;<br>
is&nbsp;self</tt></dd></dl>

<dl><dt><a name="Lea-support"><strong>support</strong></a>(self)</dt><dd><tt>same&nbsp;as&nbsp;vals&nbsp;method</tt></dd></dl>

<dl><dt><a name="Lea-times"><strong>times</strong></a>(self, n, op<font color="#909090">=&lt;built-in function add&gt;</font>)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Tlea&nbsp;instance&nbsp;representing&nbsp;the&nbsp;current&nbsp;distribution<br>
operated&nbsp;n&nbsp;times&nbsp;with&nbsp;itself,&nbsp;through&nbsp;the&nbsp;given&nbsp;binary&nbsp;operator</tt></dd></dl>

<dl><dt><a name="Lea-timesTuple"><strong>timesTuple</strong></a>(self, n)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Tlea&nbsp;instance&nbsp;with&nbsp;tuples&nbsp;of&nbsp;length&nbsp;n,&nbsp;containing<br>
the&nbsp;cartesian&nbsp;product&nbsp;of&nbsp;self&nbsp;with&nbsp;itslef&nbsp;repeated&nbsp;n&nbsp;times</tt></dd></dl>

<dl><dt><a name="Lea-vals"><strong>vals</strong></a>(self)</dt><dd><tt>returns&nbsp;a&nbsp;tuple&nbsp;with&nbsp;values&nbsp;of&nbsp;self<br>
the&nbsp;sequence&nbsp;follows&nbsp;the&nbsp;increasing&nbsp;order&nbsp;defined&nbsp;on&nbsp;values<br>
if&nbsp;order&nbsp;is&nbsp;undefined&nbsp;(e.g.&nbsp;complex&nbsp;numbers),&nbsp;then&nbsp;the&nbsp;order&nbsp;is<br>
arbitrary&nbsp;but&nbsp;fixed&nbsp;from&nbsp;call&nbsp;to&nbsp;call</tt></dd></dl>

<dl><dt><a name="Lea-vps"><strong>vps</strong></a>(self)</dt><dd><tt>returns&nbsp;a&nbsp;tuple&nbsp;with&nbsp;tuples&nbsp;(v,p)&nbsp;where&nbsp;v&nbsp;is&nbsp;a&nbsp;value&nbsp;of&nbsp;self<br>
and&nbsp;p&nbsp;is&nbsp;the&nbsp;associated&nbsp;probability&nbsp;weight&nbsp;(integer&nbsp;&gt;&nbsp;0);<br>
the&nbsp;sequence&nbsp;follows&nbsp;the&nbsp;order&nbsp;defined&nbsp;on&nbsp;values</tt></dd></dl>

<dl><dt><a name="Lea-withCondProb"><strong>withCondProb</strong></a>(self, condLea, givenCondLea, pNum, pDen)</dt><dd><tt>[DEPRECATED:&nbsp;use&nbsp;<a href="#Lea">Lea</a>.revisedWithCPT&nbsp;instead]<br>
returns&nbsp;a&nbsp;new&nbsp;Alea&nbsp;instance&nbsp;from&nbsp;current&nbsp;distribution,<br>
such&nbsp;that&nbsp;pNum/pDen&nbsp;is&nbsp;the&nbsp;probability&nbsp;that&nbsp;condLea&nbsp;is&nbsp;true<br>
given&nbsp;that&nbsp;givenCondLea&nbsp;is&nbsp;True,&nbsp;under&nbsp;the&nbsp;constraint&nbsp;that<br>
the&nbsp;returned&nbsp;distribution&nbsp;keeps&nbsp;prior&nbsp;probabilities&nbsp;of&nbsp;condLea<br>
and&nbsp;givenCondLea&nbsp;unchanged</tt></dd></dl>

<dl><dt><a name="Lea-withProb"><strong>withProb</strong></a>(self, condLea, pNum, pDen<font color="#909090">=None</font>)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Alea&nbsp;instance&nbsp;from&nbsp;current&nbsp;distribution,<br>
such&nbsp;that&nbsp;pNum/pDen&nbsp;is&nbsp;the&nbsp;probability&nbsp;that&nbsp;condLea&nbsp;is&nbsp;true<br>
if&nbsp;pDen&nbsp;is&nbsp;None,&nbsp;then&nbsp;pNum&nbsp;expresses&nbsp;the&nbsp;probability&nbsp;as&nbsp;a&nbsp;Fraction</tt></dd></dl>

<hr>
Static methods defined here:<br>
<dl><dt><a name="Lea-bernoulli"><strong>bernoulli</strong></a>(pNum, pDen<font color="#909090">=None</font>)</dt><dd><tt>static&nbsp;method,&nbsp;returns&nbsp;an&nbsp;Alea&nbsp;instance&nbsp;representing&nbsp;a&nbsp;bernoulli<br>
distribution&nbsp;giving&nbsp;1&nbsp;with&nbsp;probability&nbsp;pNum/pDen&nbsp;and&nbsp;0&nbsp;with<br>
complementary&nbsp;probability;<br>
if&nbsp;pDen&nbsp;is&nbsp;None,&nbsp;then&nbsp;pNum&nbsp;expresses&nbsp;the&nbsp;probability&nbsp;as&nbsp;a&nbsp;Fraction</tt></dd></dl>

<dl><dt><a name="Lea-binom"><strong>binom</strong></a>(n, pNum, pDen<font color="#909090">=None</font>)</dt><dd><tt>static&nbsp;method,&nbsp;returns&nbsp;an&nbsp;Alea&nbsp;instance&nbsp;representing&nbsp;a&nbsp;binomial<br>
distribution&nbsp;giving&nbsp;the&nbsp;number&nbsp;of&nbsp;successes&nbsp;among&nbsp;a&nbsp;number&nbsp;n&nbsp;of&nbsp;<br>
independent&nbsp;experiments,&nbsp;each&nbsp;having&nbsp;probability&nbsp;pNum/pDen&nbsp;of&nbsp;success;&nbsp;&nbsp;<br>
if&nbsp;pDen&nbsp;is&nbsp;None,&nbsp;then&nbsp;pNum&nbsp;expresses&nbsp;the&nbsp;probability&nbsp;as&nbsp;a&nbsp;Fraction</tt></dd></dl>

<dl><dt><a name="Lea-boolProb"><strong>boolProb</strong></a>(pNum, pDen<font color="#909090">=None</font>)</dt><dd><tt>static&nbsp;method,&nbsp;returns&nbsp;an&nbsp;Alea&nbsp;instance&nbsp;representing&nbsp;a&nbsp;boolean<br>
distribution&nbsp;such&nbsp;that&nbsp;probability&nbsp;of&nbsp;True&nbsp;is&nbsp;pNum/pDen<br>
if&nbsp;pDen&nbsp;is&nbsp;None,&nbsp;then&nbsp;pNum&nbsp;expresses&nbsp;the&nbsp;probability&nbsp;as&nbsp;a&nbsp;Fraction</tt></dd></dl>

<dl><dt><a name="Lea-buildCPT"><strong>buildCPT</strong></a>(*clauses, **kwargs)</dt><dd><tt>returns&nbsp;an&nbsp;instance&nbsp;of&nbsp;Blea&nbsp;representing&nbsp;the&nbsp;conditional&nbsp;probability&nbsp;table<br>
(e.g.&nbsp;a&nbsp;node&nbsp;in&nbsp;a&nbsp;Bayes&nbsp;network)&nbsp;from&nbsp;the&nbsp;given&nbsp;clauses;<br>
each&nbsp;clause&nbsp;is&nbsp;a&nbsp;tuple&nbsp;(condition,result)<br>
where&nbsp;condition&nbsp;is&nbsp;a&nbsp;boolean&nbsp;or&nbsp;a&nbsp;<a href="#Lea">Lea</a>&nbsp;boolean&nbsp;distribution<br>
&nbsp;&nbsp;and&nbsp;result&nbsp;is&nbsp;a&nbsp;value&nbsp;or&nbsp;<a href="#Lea">Lea</a>&nbsp;distribution&nbsp;representing&nbsp;the&nbsp;result<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assuming&nbsp;that&nbsp;condition&nbsp;is&nbsp;true<br>
the&nbsp;conditions&nbsp;from&nbsp;all&nbsp;clauses&nbsp;shall&nbsp;be&nbsp;mutually&nbsp;exclusive<br>
if&nbsp;a&nbsp;clause&nbsp;contains&nbsp;None&nbsp;as&nbsp;condition,&nbsp;then&nbsp;it&nbsp;is&nbsp;considered&nbsp;as&nbsp;a&nbsp;'else'<br>
condition<br>
if&nbsp;a&nbsp;priorLea&nbsp;argument&nbsp;is&nbsp;specified,&nbsp;then&nbsp;the&nbsp;'else'&nbsp;clause&nbsp;is&nbsp;calculated<br>
so&nbsp;that&nbsp;the&nbsp;returned&nbsp;Blea&nbsp;if&nbsp;no&nbsp;condition&nbsp;is&nbsp;given&nbsp;is&nbsp;priorLea&nbsp;;&nbsp;it&nbsp;is&nbsp;an&nbsp;<br>
error&nbsp;to&nbsp;specify&nbsp;a&nbsp;'else'&nbsp;clause&nbsp;if&nbsp;priorLea&nbsp;argument&nbsp;is&nbsp;specified</tt></dd></dl>

<dl><dt><a name="Lea-buildCPTFromDict"><strong>buildCPTFromDict</strong></a>(aCPTDict, priorLea<font color="#909090">=None</font>)</dt><dd><tt>same&nbsp;as&nbsp;buildCPT,&nbsp;with&nbsp;clauses&nbsp;specified&nbsp;in&nbsp;the&nbsp;aCPTDict&nbsp;dictionary<br>
{condition:result}</tt></dd></dl>

<dl><dt><a name="Lea-coerce"><strong>coerce</strong></a>(value)</dt><dd><tt>static&nbsp;method,&nbsp;returns&nbsp;a&nbsp;<a href="#Lea">Lea</a>&nbsp;instance&nbsp;corresponding&nbsp;the&nbsp;given&nbsp;value:<br>
if&nbsp;the&nbsp;value&nbsp;is&nbsp;a&nbsp;<a href="#Lea">Lea</a>&nbsp;instance,&nbsp;then&nbsp;it&nbsp;is&nbsp;returned<br>
otherwise,&nbsp;an&nbsp;Alea&nbsp;instance&nbsp;is&nbsp;returned,&nbsp;with&nbsp;given&nbsp;value<br>
as&nbsp;unique&nbsp;(certain)&nbsp;value</tt></dd></dl>

<dl><dt><a name="Lea-fastMax"><strong>fastMax</strong></a>(*args)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Alea&nbsp;instance&nbsp;giving&nbsp;the&nbsp;probabilities&nbsp;to&nbsp;have&nbsp;the&nbsp;maximum<br>
value&nbsp;of&nbsp;each&nbsp;combination&nbsp;of&nbsp;the&nbsp;given&nbsp;args;<br>
if&nbsp;some&nbsp;elements&nbsp;of&nbsp;args&nbsp;are&nbsp;not&nbsp;<a href="#Lea">Lea</a>&nbsp;instance,&nbsp;then&nbsp;these&nbsp;are&nbsp;coerced<br>
to&nbsp;an&nbsp;<a href="#Lea">Lea</a>&nbsp;instance&nbsp;with&nbsp;probability&nbsp;1;<br>
the&nbsp;method&nbsp;uses&nbsp;an&nbsp;efficient&nbsp;algorithm&nbsp;(linear&nbsp;complexity),&nbsp;which&nbsp;is<br>
due&nbsp;to&nbsp;Nicky&nbsp;van&nbsp;Foreest;&nbsp;for&nbsp;explanations,&nbsp;see<br>
<a href="http://nicky.vanforeest.com/scheduling/cpm/stochasticMakespan.html">http://nicky.vanforeest.com/scheduling/cpm/stochasticMakespan.html</a><br>
Note:&nbsp;unlike&nbsp;most&nbsp;of&nbsp;<a href="#Lea">Lea</a>&nbsp;methods,&nbsp;the&nbsp;distribution&nbsp;returned&nbsp;by&nbsp;<a href="#Lea">Lea</a>.fastMax<br>
loses&nbsp;any&nbsp;dependency&nbsp;with&nbsp;given&nbsp;args;&nbsp;this&nbsp;could&nbsp;be&nbsp;important&nbsp;if&nbsp;some&nbsp;args<br>
appear&nbsp;in&nbsp;the&nbsp;same&nbsp;expression&nbsp;as&nbsp;<a href="#Lea">Lea</a>.<a href="#Lea-max">max</a>(...)&nbsp;but&nbsp;outside&nbsp;it,&nbsp;e.g.<br>
conditional&nbsp;probability&nbsp;expressions;&nbsp;this&nbsp;limitation&nbsp;can&nbsp;be&nbsp;avoided&nbsp;by<br>
using&nbsp;the&nbsp;<a href="#Lea">Lea</a>.max&nbsp;method;&nbsp;however,&nbsp;this&nbsp;last&nbsp;method&nbsp;can&nbsp;be<br>
prohibitively&nbsp;slower&nbsp;(exponential&nbsp;complexity)</tt></dd></dl>

<dl><dt><a name="Lea-fastMin"><strong>fastMin</strong></a>(*args)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Alea&nbsp;instance&nbsp;giving&nbsp;the&nbsp;probabilities&nbsp;to&nbsp;have&nbsp;the&nbsp;minimum<br>
value&nbsp;of&nbsp;each&nbsp;combination&nbsp;of&nbsp;the&nbsp;given&nbsp;args;<br>
if&nbsp;some&nbsp;elements&nbsp;of&nbsp;args&nbsp;are&nbsp;not&nbsp;<a href="#Lea">Lea</a>&nbsp;instances,&nbsp;then&nbsp;these&nbsp;are&nbsp;coerced<br>
to&nbsp;an&nbsp;Alea&nbsp;instance&nbsp;with&nbsp;probability&nbsp;1;<br>
the&nbsp;method&nbsp;uses&nbsp;an&nbsp;efficient&nbsp;algorithm&nbsp;(linear&nbsp;complexity),&nbsp;which&nbsp;is<br>
due&nbsp;to&nbsp;Nicky&nbsp;van&nbsp;Foreest;&nbsp;for&nbsp;explanations,&nbsp;see<br>
<a href="http://nicky.vanforeest.com/scheduling/cpm/stochasticMakespan.html">http://nicky.vanforeest.com/scheduling/cpm/stochasticMakespan.html</a><br>
Note:&nbsp;unlike&nbsp;most&nbsp;of&nbsp;<a href="#Lea">Lea</a>&nbsp;methods,&nbsp;the&nbsp;distribution&nbsp;returned&nbsp;by&nbsp;<a href="#Lea">Lea</a>.fastMin<br>
loses&nbsp;any&nbsp;dependency&nbsp;with&nbsp;given&nbsp;args;&nbsp;this&nbsp;could&nbsp;be&nbsp;important&nbsp;if&nbsp;some&nbsp;args<br>
appear&nbsp;in&nbsp;the&nbsp;same&nbsp;expression&nbsp;as&nbsp;<a href="#Lea">Lea</a>.<a href="#Lea-min">min</a>(...)&nbsp;but&nbsp;outside&nbsp;it,&nbsp;e.g.<br>
conditional&nbsp;probability&nbsp;expressions;&nbsp;this&nbsp;limitation&nbsp;can&nbsp;be&nbsp;avoided&nbsp;by<br>
using&nbsp;the&nbsp;<a href="#Lea">Lea</a>.min&nbsp;method;&nbsp;however,&nbsp;this&nbsp;last&nbsp;method&nbsp;can&nbsp;be&nbsp;prohibitively<br>
slower&nbsp;(exponential&nbsp;complexity)</tt></dd></dl>

<dl><dt><a name="Lea-fromSeq"><strong>fromSeq</strong></a>(sequence)</dt><dd><tt>static&nbsp;method,&nbsp;returns&nbsp;an&nbsp;Alea&nbsp;instance&nbsp;representing&nbsp;a&nbsp;distribution<br>
for&nbsp;the&nbsp;given&nbsp;sequence&nbsp;of&nbsp;values&nbsp;(e.g.&nbsp;a&nbsp;list,&nbsp;tuple,&nbsp;iterator,...),<br>
so&nbsp;that&nbsp;each&nbsp;value&nbsp;occurrence&nbsp;is&nbsp;taken&nbsp;as&nbsp;equiprobable;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
if&nbsp;each&nbsp;value&nbsp;occurs&nbsp;exactly&nbsp;once,&nbsp;then&nbsp;the&nbsp;distribution&nbsp;is&nbsp;uniform,<br>
i.e.&nbsp;the&nbsp;probability&nbsp;of&nbsp;each&nbsp;value&nbsp;is&nbsp;equal&nbsp;to&nbsp;1&nbsp;/&nbsp;#values;<br>
if&nbsp;the&nbsp;sequence&nbsp;is&nbsp;empty,&nbsp;then&nbsp;an&nbsp;exception&nbsp;is&nbsp;raised</tt></dd></dl>

<dl><dt><a name="Lea-fromValFreqs"><strong>fromValFreqs</strong></a>(*valFreqs)</dt><dd><tt>static&nbsp;method,&nbsp;returns&nbsp;an&nbsp;Alea&nbsp;instance&nbsp;representing&nbsp;a&nbsp;distribution<br>
for&nbsp;the&nbsp;given&nbsp;sequence&nbsp;of&nbsp;(val,freq)&nbsp;tuples,&nbsp;where&nbsp;freq&nbsp;is&nbsp;a&nbsp;natural&nbsp;number<br>
so&nbsp;that&nbsp;each&nbsp;value&nbsp;is&nbsp;taken&nbsp;with&nbsp;the&nbsp;given&nbsp;frequency&nbsp;(or&nbsp;sum&nbsp;of&nbsp;<br>
frequencies&nbsp;of&nbsp;that&nbsp;value&nbsp;if&nbsp;it&nbsp;occurs&nbsp;multiple&nbsp;times);<br>
the&nbsp;frequencies&nbsp;are&nbsp;reduced&nbsp;by&nbsp;dividing&nbsp;them&nbsp;by&nbsp;their&nbsp;GCD<br>
if&nbsp;the&nbsp;sequence&nbsp;is&nbsp;empty,&nbsp;then&nbsp;an&nbsp;exception&nbsp;is&nbsp;raised</tt></dd></dl>

<dl><dt><a name="Lea-fromValFreqsDict"><strong>fromValFreqsDict</strong></a>(probDict)</dt><dd><tt>static&nbsp;method,&nbsp;returns&nbsp;an&nbsp;Alea&nbsp;instance&nbsp;representing&nbsp;a&nbsp;distribution<br>
for&nbsp;the&nbsp;given&nbsp;dictionary&nbsp;of&nbsp;{val:prob},&nbsp;where&nbsp;prob&nbsp;is&nbsp;an&nbsp;integer&nbsp;number<br>
so&nbsp;that&nbsp;each&nbsp;value&nbsp;val&nbsp;has&nbsp;probability&nbsp;proportional&nbsp;to&nbsp;prob&nbsp;to&nbsp;occur<br>
if&nbsp;the&nbsp;sequence&nbsp;is&nbsp;empty,&nbsp;then&nbsp;an&nbsp;exception&nbsp;is&nbsp;raised</tt></dd></dl>

<dl><dt><a name="Lea-fromValFreqsDictArgs"><strong>fromValFreqsDictArgs</strong></a>(**probDict)</dt><dd><tt>static&nbsp;method,&nbsp;same&nbsp;as&nbsp;fromValFreqsDict,&nbsp;excepting&nbsp;that&nbsp;the&nbsp;dictionary<br>
is&nbsp;passed&nbsp;in&nbsp;a&nbsp;**kwargs&nbsp;style</tt></dd></dl>

<dl><dt><a name="Lea-fromValFreqsNR"><strong>fromValFreqsNR</strong></a>(*valFreqs)</dt><dd><tt>static&nbsp;method,&nbsp;returns&nbsp;an&nbsp;Alea&nbsp;instance&nbsp;representing&nbsp;a&nbsp;distribution<br>
for&nbsp;the&nbsp;given&nbsp;sequence&nbsp;of&nbsp;(val,freq)&nbsp;tuples,&nbsp;where&nbsp;freq&nbsp;is&nbsp;a&nbsp;natural&nbsp;number<br>
so&nbsp;that&nbsp;each&nbsp;value&nbsp;is&nbsp;taken&nbsp;with&nbsp;the&nbsp;given&nbsp;frequency&nbsp;(or&nbsp;sum&nbsp;of&nbsp;<br>
frequencies&nbsp;of&nbsp;that&nbsp;value&nbsp;if&nbsp;it&nbsp;occurs&nbsp;multiple&nbsp;times);<br>
if&nbsp;the&nbsp;sequence&nbsp;is&nbsp;empty,&nbsp;then&nbsp;an&nbsp;exception&nbsp;is&nbsp;raised</tt></dd></dl>

<dl><dt><a name="Lea-fromVals"><strong>fromVals</strong></a>(*vals)</dt><dd><tt>static&nbsp;method,&nbsp;returns&nbsp;an&nbsp;Alea&nbsp;instance&nbsp;representing&nbsp;a&nbsp;distribution<br>
for&nbsp;the&nbsp;given&nbsp;values&nbsp;passed&nbsp;as&nbsp;arguments,&nbsp;so&nbsp;that&nbsp;each&nbsp;value<br>
occurrence&nbsp;is&nbsp;taken&nbsp;as&nbsp;equiprobable;<br>
if&nbsp;each&nbsp;value&nbsp;occurs&nbsp;exactly&nbsp;once,&nbsp;then&nbsp;the&nbsp;distribution&nbsp;is&nbsp;uniform,<br>
i.e.&nbsp;the&nbsp;probability&nbsp;of&nbsp;each&nbsp;value&nbsp;is&nbsp;equal&nbsp;to&nbsp;1&nbsp;/&nbsp;#values;<br>
if&nbsp;the&nbsp;sequence&nbsp;is&nbsp;empty,&nbsp;then&nbsp;an&nbsp;exception&nbsp;is&nbsp;raised</tt></dd></dl>

<dl><dt><a name="Lea-if_"><strong>if_</strong></a>(condLea, thenLea, elseLea)</dt><dd><tt>returns&nbsp;an&nbsp;instance&nbsp;of&nbsp;Blea&nbsp;representing&nbsp;the&nbsp;conditional&nbsp;probability&nbsp;table<br>
giving&nbsp;thenLea&nbsp;&nbsp;if&nbsp;condLea&nbsp;is&nbsp;true<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elseLea&nbsp;&nbsp;otherwise<br>
this&nbsp;is&nbsp;a&nbsp;convenience&nbsp;method&nbsp;equivalent&nbsp;to&nbsp;<br>
&nbsp;&nbsp;<a href="#Lea">Lea</a>.<a href="#Lea-buildCPT">buildCPT</a>((condLea,thenLea),(None,elseLea))</tt></dd></dl>

<dl><dt><a name="Lea-interval"><strong>interval</strong></a>(fromVal, toVal)</dt><dd><tt>static&nbsp;method,&nbsp;returns&nbsp;an&nbsp;Alea&nbsp;instance&nbsp;representing&nbsp;a&nbsp;uniform&nbsp;probability<br>
distribution,&nbsp;for&nbsp;all&nbsp;the&nbsp;integers&nbsp;in&nbsp;the&nbsp;interval&nbsp;[fromVal,toVal]</tt></dd></dl>

<dl><dt><a name="Lea-max"><strong>max</strong></a>(*args)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Flea&nbsp;instance&nbsp;giving&nbsp;the&nbsp;probabilities&nbsp;to&nbsp;have&nbsp;the&nbsp;maximum<br>
value&nbsp;of&nbsp;each&nbsp;combination&nbsp;of&nbsp;the&nbsp;given&nbsp;args;<br>
if&nbsp;some&nbsp;elements&nbsp;of&nbsp;args&nbsp;are&nbsp;not&nbsp;<a href="#Lea">Lea</a>&nbsp;instances,&nbsp;then&nbsp;these&nbsp;are&nbsp;coerced<br>
to&nbsp;a&nbsp;<a href="#Lea">Lea</a>&nbsp;instance&nbsp;with&nbsp;probability&nbsp;1;<br>
the&nbsp;returned&nbsp;distribution&nbsp;keeps&nbsp;dependencies&nbsp;with&nbsp;args&nbsp;but&nbsp;the&nbsp;<br>
calculation&nbsp;could&nbsp;be&nbsp;prohibitively&nbsp;slow&nbsp;(exponential&nbsp;complexity);<br>
for&nbsp;a&nbsp;more&nbsp;efficient&nbsp;implemetation,&nbsp;assuming&nbsp;that&nbsp;dependencies&nbsp;are&nbsp;not<br>
needed,&nbsp;see&nbsp;<a href="#Lea">Lea</a>.fastMax&nbsp;method</tt></dd></dl>

<dl><dt><a name="Lea-min"><strong>min</strong></a>(*args)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Flea&nbsp;instance&nbsp;giving&nbsp;the&nbsp;probabilities&nbsp;to&nbsp;have&nbsp;the&nbsp;minimum<br>
value&nbsp;of&nbsp;each&nbsp;combination&nbsp;of&nbsp;the&nbsp;given&nbsp;args;<br>
if&nbsp;some&nbsp;elements&nbsp;of&nbsp;args&nbsp;are&nbsp;not&nbsp;<a href="#Lea">Lea</a>&nbsp;instances,&nbsp;then&nbsp;these&nbsp;are&nbsp;coerced<br>
to&nbsp;a&nbsp;<a href="#Lea">Lea</a>&nbsp;instance&nbsp;with&nbsp;probability&nbsp;1;<br>
the&nbsp;returned&nbsp;distribution&nbsp;keeps&nbsp;dependencies&nbsp;with&nbsp;args&nbsp;but&nbsp;the&nbsp;<br>
calculation&nbsp;could&nbsp;be&nbsp;prohibitively&nbsp;slow&nbsp;(exponential&nbsp;complexity);<br>
for&nbsp;a&nbsp;more&nbsp;efficient&nbsp;implemetation,&nbsp;assuming&nbsp;that&nbsp;dependencies&nbsp;are&nbsp;not<br>
needed,&nbsp;see&nbsp;<a href="#Lea">Lea</a>.fastMin&nbsp;method</tt></dd></dl>

<dl><dt><a name="Lea-poisson"><strong>poisson</strong></a>(mean, precision<font color="#909090">=1e-20</font>)</dt><dd><tt>static&nbsp;method,&nbsp;returns&nbsp;an&nbsp;Alea&nbsp;instance&nbsp;representing&nbsp;a&nbsp;Poisson&nbsp;probability<br>
distribution&nbsp;having&nbsp;the&nbsp;given&nbsp;mean;&nbsp;the&nbsp;distribution&nbsp;is&nbsp;approximated&nbsp;by<br>
the&nbsp;finite&nbsp;set&nbsp;of&nbsp;values&nbsp;that&nbsp;have&nbsp;probability&nbsp;&gt;&nbsp;precision&nbsp;(=&nbsp;1e-20&nbsp;by&nbsp;default)<br>
(i.e.&nbsp;low/high&nbsp;values&nbsp;with&nbsp;too&nbsp;small&nbsp;probabilities&nbsp;are&nbsp;dropped)</tt></dd></dl>

<dl><dt><a name="Lea-reduce"><strong>reduce</strong></a>(op, args)</dt><dd><tt>returns&nbsp;a&nbsp;new&nbsp;Flea&nbsp;instance&nbsp;that&nbsp;join&nbsp;the&nbsp;given&nbsp;args&nbsp;with&nbsp;the&nbsp;given<br>
function&nbsp;op,&nbsp;from&nbsp;left&nbsp;to&nbsp;right;<br>
requires&nbsp;that&nbsp;op&nbsp;is&nbsp;a&nbsp;2-ary&nbsp;function,&nbsp;accepting&nbsp;self's&nbsp;values&nbsp;as&nbsp;arguments;<br>
requires&nbsp;that&nbsp;args&nbsp;contains&nbsp;at&nbsp;least&nbsp;one&nbsp;element</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>data</strong></dt>
</dl>
<dl><dt><strong>false</strong></dt>
<dd><tt>Alea&nbsp;is&nbsp;a&nbsp;Lea&nbsp;subclass,&nbsp;which&nbsp;instance&nbsp;is&nbsp;defined&nbsp;by&nbsp;explicit&nbsp;probability&nbsp;distribution&nbsp;data.<br>
An&nbsp;Alea&nbsp;instance&nbsp;is&nbsp;defined&nbsp;by&nbsp;given&nbsp;value-probability&nbsp;pairs.&nbsp;Each&nbsp;probability&nbsp;is<br>
defined&nbsp;as&nbsp;a&nbsp;positive&nbsp;"counter"&nbsp;or&nbsp;"weight"&nbsp;integer,&nbsp;without&nbsp;upper&nbsp;limit.&nbsp;The&nbsp;actual<br>
probabilities&nbsp;are&nbsp;calculated&nbsp;by&nbsp;dividing&nbsp;the&nbsp;counters&nbsp;by&nbsp;the&nbsp;sum&nbsp;of&nbsp;all&nbsp;counters.</tt></dd>
</dl>
<dl><dt><strong>name</strong></dt>
</dl>
<dl><dt><strong>true</strong></dt>
<dd><tt>Alea&nbsp;is&nbsp;a&nbsp;Lea&nbsp;subclass,&nbsp;which&nbsp;instance&nbsp;is&nbsp;defined&nbsp;by&nbsp;explicit&nbsp;probability&nbsp;distribution&nbsp;data.<br>
An&nbsp;Alea&nbsp;instance&nbsp;is&nbsp;defined&nbsp;by&nbsp;given&nbsp;value-probability&nbsp;pairs.&nbsp;Each&nbsp;probability&nbsp;is<br>
defined&nbsp;as&nbsp;a&nbsp;positive&nbsp;"counter"&nbsp;or&nbsp;"weight"&nbsp;integer,&nbsp;without&nbsp;upper&nbsp;limit.&nbsp;The&nbsp;actual<br>
probabilities&nbsp;are&nbsp;calculated&nbsp;by&nbsp;dividing&nbsp;the&nbsp;counters&nbsp;by&nbsp;the&nbsp;sum&nbsp;of&nbsp;all&nbsp;counters.</tt></dd>
</dl>
<dl><dt><strong>zero</strong></dt>
<dd><tt>Alea&nbsp;is&nbsp;a&nbsp;Lea&nbsp;subclass,&nbsp;which&nbsp;instance&nbsp;is&nbsp;defined&nbsp;by&nbsp;explicit&nbsp;probability&nbsp;distribution&nbsp;data.<br>
An&nbsp;Alea&nbsp;instance&nbsp;is&nbsp;defined&nbsp;by&nbsp;given&nbsp;value-probability&nbsp;pairs.&nbsp;Each&nbsp;probability&nbsp;is<br>
defined&nbsp;as&nbsp;a&nbsp;positive&nbsp;"counter"&nbsp;or&nbsp;"weight"&nbsp;integer,&nbsp;without&nbsp;upper&nbsp;limit.&nbsp;The&nbsp;actual<br>
probabilities&nbsp;are&nbsp;calculated&nbsp;by&nbsp;dividing&nbsp;the&nbsp;counters&nbsp;by&nbsp;the&nbsp;sum&nbsp;of&nbsp;all&nbsp;counters.</tt></dd>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>Error</strong> = &lt;class 'lea.Error'&gt;<dd><tt>exception&nbsp;representing&nbsp;any&nbsp;violation&nbsp;of&nbsp;requirements&nbsp;of&nbsp;<a href="#Lea">Lea</a>&nbsp;methods</tt></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-log"><strong>log</strong></a>(...)</dt><dd><tt><a href="#-log">log</a>(x[,&nbsp;base])<br>
&nbsp;<br>
Return&nbsp;the&nbsp;logarithm&nbsp;of&nbsp;x&nbsp;to&nbsp;the&nbsp;given&nbsp;base.<br>
If&nbsp;the&nbsp;base&nbsp;not&nbsp;specified,&nbsp;returns&nbsp;the&nbsp;natural&nbsp;logarithm&nbsp;(base&nbsp;e)&nbsp;of&nbsp;x.</tt></dd></dl>
</td></tr></table>
</body></html>